<template>
<el-card shadow="never" class="aui-card--fill">
    <div class="mod-sys__dept">
        <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
            <el-form-item>
                <el-input v-model="dataForm.bossName" placeholder="雇主名称" clearable></el-input>
            </el-form-item>
            <el-form-item>
                <el-input v-model="dataForm.bossPhone" placeholder="雇主电话" clearable></el-input>
            </el-form-item>
            <el-form-item>
                <el-input v-model="dataForm.name" placeholder="求职人姓名" clearable></el-input>
            </el-form-item>
            <el-form-item>
                <el-input v-model="dataForm.phone" placeholder="求职人电话" clearable></el-input>
            </el-form-item>
            <el-form-item>
                <el-input v-model="dataForm.workName" placeholder="职位名称" clearable></el-input>
            </el-form-item>
            <el-form-item>
                <el-input v-model="dataForm.education" placeholder="学历" clearable></el-input>
            </el-form-item>
            <el-form-item>
                <el-select v-model="dataForm.state" placeholder="订单状态" clearable>
                    <el-option :value="item.val" v-for="item in status" :key="item.val" :label="item.name">
                    </el-option>
                </el-select>
            </el-form-item>
            <el-form-item>
                <el-date-picker v-model="dataForm.createDate" type="date" placeholder="发布时间" value-format="yyyy-MM-dd">
                </el-date-picker>
            </el-form-item>
            <el-form-item>
                <el-button @click="getDataList()">{{ $t("query") }}</el-button>
            </el-form-item>
        </el-form>
        <el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%">
            <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
            <el-table-column prop="workName" label="职位名称" align="center" :show-overflow-tooltip="true" min-width="120"></el-table-column>
            <el-table-column prop="bossName" label="雇主姓名" align="center" :show-overflow-tooltip="true" min-width="120"></el-table-column>
            <el-table-column prop="bossPhone" label="雇主联系电话" align="center" width="120"></el-table-column>
            <el-table-column prop="name" label="求职人姓名" align="center" :show-overflow-tooltip="true" min-width="120"></el-table-column>
            <el-table-column prop="phone" label="求职人联系电话" align="center" width="120"></el-table-column>
            <el-table-column prop="money" label="薪资" header-align="center" align="center"></el-table-column>
            <el-table-column prop="education" label="学历" header-align="center" align="center"></el-table-column>
            <el-table-column prop="state" label="状态" header-align="center" align="center">
                <template slot-scope="scope">
                    {{scope.row.state==0?'待确认':scope.row.state==1?'已完成':'已回绝'}}
                </template>
            </el-table-column>
            <el-table-column prop="createDate" label="创建时间" header-align="center" align="center" min-width="160"></el-table-column>
            <el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
                <template slot-scope="scope">
                    <el-button v-if="$hasPermission('scenic:positioninformation:delete')"  type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t("delete") }}</el-button>
                </template>
            </el-table-column>
        </el-table>
        <el-pagination :current-page="page" :page-sizes="[10, 20, 50, 100]" :page-size="limit" :total="total" layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle" @current-change="pageCurrentChangeHandle">
        </el-pagination>
    </div>
</el-card>
</template>

<script>
import mixinViewModule from "@/mixins/view-module";
export default {
    mixins: [mixinViewModule],
    data() {
        return {
            mixinViewModuleOptions: {
                getDataListURL: "/scenic/positioninformation/getAllPage",
                deleteURL: "/scenic/positioninformation",
                getDataListIsPage: true,
                deleteIsBatch: true,
                exportURL: "/scenic/positioninformation/export",
            },
            dataForm: {
                name: '',
                phone: '',
                bossName: '',
                bossPhone: '',
                education: '',
                state: ''
            },
            status: [{
                    val: 0,
                    name: '待确认'
                },
                {
                    val: 1,
                    name: '已完成'
                },
                {
                    val: 2,
                    name: '已回绝'
                }
            ]
        };
    },
    components: {},
};
</script>
